package net;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;

/**
 *
 * @author Andrea
 */
public class Connection extends Thread{
    
    private final Socket socket;
    private final BufferedReader br;
    private final PrintStream ps;
    
    public Connection(Socket s) throws IOException {
        socket = s;
        
        br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            
        ps = new PrintStream(socket.getOutputStream());
    }

    @Override
    public void run() {
        
        //start with the handshake with the server
        
        /*
         * at the beginning of the connection the server sends to the client his 
         * identification number, it is an integer number, after the client can 
         * send also his nickname without it the server remember the client with his id
         * 
         */
    }
}
